package cn.byapps.attendance.util;

public class SystemUtils {
	public static SystemUtils mSystemUtils;
	private boolean DEBUG = true;
	private String MODULE = "Attendance";

	public static SystemUtils getInstance() {
		if (mSystemUtils == null) {
			Class arg = SystemUtils.class;
			synchronized (SystemUtils.class) {
				mSystemUtils = new SystemUtils();
			}
		}

		return mSystemUtils;
	}

	public void System(String msg) {
		if (this.DEBUG) {
			Throwable throwable = new Throwable();
			StackTraceElement[] elements = throwable.getStackTrace();
			String callerClassName = elements[1].getClassName();
			String[] classStrings = callerClassName.split("\\.");
			String callerMethodName = elements[1].getMethodName();
			int callerLinNum = elements[1].getLineNumber();
			System.out.println(this.MODULE + "-->" + classStrings[classStrings.length - 1] + "-->" + callerMethodName
					+ "-->" + callerLinNum + "-->" + msg);
		}
	}
}